/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.geotools.tutorial;

import java.awt.Event;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import org.geotools.swing.action.SafeAction;

/**
 *
 * @author oleg
 */
public class DirectionButtonSave extends JButton {
    DirectionImprovement dir;

    public DirectionButtonSave(DirectionImprovement di) {
        this.dir = di;
        this.setAction(new SafeAction("save"){

            @Override
            public void action(ActionEvent e) throws Throwable {
                dir.save();
            }

        });
    }
    
    
}
